#ifndef D_OPENGL_SHADER_EFFECT_H
#define D_OPENGL_SHADER_EFFECT_H

#include <string>
#include <map>
#include <lib\GL\glew.h>
#include <modules\graphics\opengl\opengl_shader.h>

#include <helpers\math\delge_math.h>

using namespace std;
using namespace DelGE::Helpers::Math;

namespace DelGE
{
	namespace Modules
	{
		namespace Graphics
		{
			class OpenGLShaderEffect
			{
			private:
				map<string, int> mUniformMap;
				int iProgramID;

				OpenGLShaderEffect();

				int GetGLUniformLocation(string sName);

			public:
				~OpenGLShaderEffect();

				static OpenGLShaderEffect *CreateShaderEffect();

				void AttachShader(OpenGLShader *pShader);
				void DetachShader(OpenGLShader *pShader);

				void Link();

				int GetProgramID();

				void SetUniform_Integer(string sName, int iValue);
				void SetUniform_Float(string sName, float fValue);
				void SetUniform_Vector(string sName, const Vector3 &rVector);
				void SetUniform_Matrix(string sName, const Matrix &rMatrix);
			};
		}
	}
}

#endif